@extends('admin.common.main')
@section('css')
<style>
    #form-member-add{
        width: 1200px;
        margin: auto;
        color: blueviolet;
        font-weight: bold;
        font-size: 16px;
    }
    .role_list{
        width: 1200px;
        text-align: center;
        
    }
    .role_list li{
        width: 150px;
        padding: 20px;
        letter-spacing: 0.5ch;
        float: left;
        background-color: #cccccc;
        margin-left: 10px;
        margin-top: 10px;
    }
    .sub{
        position: absolute;
        top: 760px;
        width: 100px;
        height: 60px;
        border: none;
        background-color:goldenrod;
        border-radius: 10px;
    }
    .role_id{
        font-size: 20px;
    }
</style>
@endsection
@section('cnt')
<div class="x-body">
    @include('admin.common.validate')
    @include('admin.common.msg')
    <form action="{{ route('admin.user.role',$user) }}" method="post" id="form-member-add">
        {{ csrf_field() }}
        <ul class="role_list">
            @foreach($roleAll as $item)
                <li><input type="radio" name="role_id" value="{{ $item->id }}" class="role_id" @if($item->id == $user->role_id) checked @endif> {{ $item->name }}</li>
            @endforeach
        </ul>
        <button type="submit" class="sub">
            分配权限
        </button>
        </div>
    </form>
</div>
@endsection
@section('js')
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script>


</script>
@endsection